global class batchProvisionRecords  {
/*global class batchProvisionRecords implements Database.Batchable<sObject>, Database.AllowsCallouts {
	global final String query;
	
	global batchProvisionRecords(String q) {
		query = q;
	}
	
	global Database.Querylocator start(Database.BatchableContext BC){
		return Database.getQueryLocator(query);
	}
	
	global void execute(Database.BatchableContext BC, List<sObject> scope) {
			ProvisioningService.postServiceRequest(scope);
	}
	
	global void finish(Database.BatchableContext BC){
		AsyncApexJob a = [SELECT Id, Status, NumberOfErrors, JobItemsProcessed, TotalJobItems,
		CreatedBy.Email FROM AsyncApexJob WHERE Id=:BC.getJobId()];
		
		//Send an email to the apex job submitter
		Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
		String[] toAddresses = new String[] {a.CreatedBy.Email};
		mail.setToAddresses(toAddresses);
		mail.setSubject('Provision Record Status: ' + a.Status);
		mail.setPlainTextBody('The provisioning Apex job processed ' + a.TotalJobItems + ' batch(es) with ' + a.NumberOfErrors + ' failures');
		Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
		
	}
	
	*/

}